Method and system for steerable medical device path definition and following during insertion and retraction

ABSTRACT

A method may comprise storing a first waypoint corresponding to a first position of a tip of a steerable medical device including an articulatable segment. The controller may perform a motion pause check operation to determine that an insertion motion of the articulatable segment into a patient anatomy has been paused, while the tip is at a second position. The controller may determine that the articulatable segment has resumed the insertion motion into the patient anatomy. After determining that the articulatable segment has resumed the insertion motion, a second waypoint corresponding to the second position of the tip of the steerable medical device, may be stored. A boundary region may be defined to form a three-dimensional volume enclosing the positions of the stored waypoints. The articulatable segment may be constrained to remain within the boundary region as the articulatable segment is inserted in the patient anatomy.

RELATED APPLICATION

The present application is a continuation of U.S. patent applicationSer. No. 16/048,438, filed Jul. 30, 2018, which is a continuation ofU.S. patent application Ser. No. 12/613,739 (filed Nov. 6, 2009), whichclaims the benefit of the filing date of U.S. Provisional PatentApplication No. 61/113,534 (filed Nov. 11, 2008) all of which are herebyincorporated by reference herein in their entirety.

BACKGROUND Field of Invention

Aspects of this invention are related to medical device path planning,and more particularly are related to path planning for an articulatablemulti-segment medical device.

Related Art

An endoscope is a medical device for visualizing the interior of apatient's body. Endoscopes have been used for a variety of medicaldiagnostic procedures and for a variety of medical interventionalprocedures.

Many different types of endoscopes are known. For example, one steerableendoscope has an elongated body with a steerable distal portion and anautomatically controlled proximal portion. Such an endoscope isdescribed in U.S. Pat. No. 6,468,203 B2, entitled “Steerable Endoscopeand Improved Method of Insertion,” of Amir Belson issued on Oct. 22,2002, which is incorporated herein by reference in its entirety.

In general, conventional medical device path-planning is performed usingmedical imaging data usually CAT, X-ray, MRI, PET of fluoroscopy imagingdata. Path-planning is considered in U.S. Pat. No. 5,611,025, entitled“Virtual internal cavity inspection system,” issued Mar 11, 1997; U.S.Pat. No. 7,167,180, entitled “Automatic path planning system andmethod,” issued Jan. 23, 2007; U.S. Pat. No. 6,380,958, entitled“Medical-technical System,” issued Apr. 30, 2002; U.S. PatentApplication Publication No. US 2008/0091340 Al (filed Dec. 26, 2004,disclosing “Targeted Marching”); and U.S. Patent Application PublicationNo. US 2003/0109780 A1 (filed Jun. 6, 2002, disclosing “Methods andApparatus for Surgical Planning”).

SUMMARY

Unlike prior art methods that required path planning prior to use of asteerable medical device, waypoints of a steerable medical device arestored as the device is moved within a patient. The stored waypoints arean ordered sequence of locations. The ordered sequence of locationsdefines a safe path within the patient for moving an articulatableportion of the steerable medical device.

Thus, the articulatable portion of the steerable medical device isconstrained to follow the safe path as the articulatable portion moveswithin the patient or as the device is inserted into the patient. In oneaspect, the articulatable portion of the steerable medical device isconstrained to remain within a boundary region enclosing the safe path.

In one embodiment, the articulatable portion of the steerable medicaldevice includes a segment of the steerable medical device. The segment,in turn, includes a plurality of links.

In another aspect, the boundary region is a tube having a cross-section.Examples of cross-sections include, but are not limited to, a circularcross-section, an oblate cross-section, and a rectangular crosscross-section.

In still yet another aspect, constraining the articulatable portion ofthe steerable medical device to remain within a boundary regionenclosing the safe path includes generating position and orientationdata for each of the plurality of segments. This process uses theordered sequence of locations and a kinematic model of the plurality ofsegments of the steerable medical device.

The process of generating position and orientation data for each of theplurality of segments includes minimizing a cost function. In oneaspect, minimizing a cost function further includes minimizing the sumof the absolute values of relative joint angles, with an additionalconstraint that link positions must remain within some distance A of thesafe path formed by the waypoints.

An apparatus includes a steerable medical device having an articulatableportion. The articulatable portion includes at least one articulatablesegment. The apparatus also includes a controller, coupled to thesteerable medical device. The controller includes a processor, and amedical device controller coupled to the processor and to the steerablemedical device. The processor stores in the memory an ordered sequenceof locations of waypoints. The processor also analyzes the orderedsequence of locations and outputs to the medical device controller atleast one command to constrain the articulatable portion within aboundary region enclosing a safe path defined by the ordered sequence oflocation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagrammatic view of a steerable medical device including anarticulatable portion, and a safe path.

FIG. 2 is a diagrammatic view of an apparatus used in one aspect of theprocesses and operations described herein.

FIGS. 3A to 3C are diagrammatic views of boundary regions enclosing asafe path.

FIG. 4 is a process flow diagram for one embodiment of a method ofconfiguring a steerable medical device to follow a safe path.

FIG. 5 is a diagrammatic view of elements of a kinematic model that canbe used in the method of FIG. 4.

In the drawings, the first digit of a figure number indicates the figurein which the element with that figure number first appeared.

DETAILED DESCRIPTION

In one aspect, a steerable medical device 100 (FIG. 1), sometimesreferred to as medical device 100, includes a plurality of segments101-1, 101-2, 101-3 . . . . In the embodiment of FIG. 1, at least threesegments 101-1, 101-2, 101-3 include a plurality of movable links 102-1,102-2 and 102-3, respectively. In one aspect, a tip of steerable medicaldevice 100 is at distal end 120 and typically includes at least acamera.

The use of a steerable medical device with at least three segments eachhaving a plurality of movable links is illustrative only and in notintended to be limiting. In view of this disclosure, a steerable medicaldevice may include from at least one segment having a plurality of linksto a number of segments with movable links needed to provide therequired functionality for the steerable medical device.

An example of a steerable medical device 100 is a steerable endoscope.In the following description, steerable medical device 100 is referredto as steerable endoscope 100. The use of steerable endoscope 100 as anexample of a steerable medical device is illustrative only and is notintended to be limiting to this specific steerable medical device.

The plurality of movable links in a segment allows that segment to bearticulated as steerable endoscope 100 moves into and out of a patient.Thus, such segments are referred to as articulatable segments.

In one aspect, an operator manipulates a direction controller 245 (FIG.2) to move the tip of steerable endoscope 100 in a particular directionwithin the patient. In response to commands from a processor inprocessor module 250, as described more completely below, and a signalfrom direction controller 245, an endoscope controller 240 (FIG. 2) forsteerable endoscope 100 configures each of the links so that eachsegment is constrained to move along, e.g., to follow, a known safe path150 (FIG. 1) that is defined, in one aspect, by movement of the tip ofendoscope 100.

In one embodiment, as the operator steers the tip of steerable endoscope100 through the patient, a safe path is generated. More specifically, asthe operator inserts steerable endoscope 100 into a patient and movessteerable endoscope 100 towards a desired location, an ordered sequenceof locations {P_(k), P_(k+1), P_(k+2), P_(k+3), P_(k+4)} (FIG. 1) of thetip of endoscope 100 are recorded in a memory 230 (FIG. 2) as waypointdata 231, in this example.

The ordered sequence of locations {P_(k), P_(k+1), P_(k+2), P_(k+3),P_(k+4)} (FIG. 1) represent the motion of the tip of steerable endoscope100 through the patient. Thus, the ordered sequence of locations {P_(k),P_(k+1), P_(k+2), P_(k+3), P_(k+4)} represent a safe path 150, which hasbeen chosen by the operator, for steerable endoscope 100 to follow assteerable endoscope 100 is inserted into and withdrawn from the patient.

Using the tip movement to generate an ordered sequence of locations thatdefine safe path 150 is illustrative only and is not intended to belimiting. Alternatively, steerable endoscope 100 could be inserted in apassive state, and then all the inserted articulatable segmentsactivated at one. The positions of the links in the articulatablesegments at the time of activation provide an ordered sequence oflocations that define safe path 150 for additional insertion and forretraction of steerable endoscope 100.

In one aspect, as described more completely below, all trailing segments101-1, 101-2, 101-03 . . . of steerable endoscope 100 are constrained tofollow safe path 150 that is defined by ordered sequence of locations{P_(k), P_(k+1), P_(k+2), P_(k+3), P_(k+4)}. However, trailing segments101-1, 101-2, 101-03 . . . may not follow safe path 150 exactly. In oneaspect, the operator can define a boundary region around safe path 150.The boundary region (See FIGS. 3A to 3C) is a volume inside whichsteerable endoscope 100 can move safely. In one aspect, all trailingsegments 101-1, 101-2, 101-03 . . . are constrained to remain withinthis boundary region as steerable endoscope 100 moves into the patient.

Also, in another aspect, as medical device 100 is withdrawn from thepatient, articulatable segments 101-1, 101-2, 101-03 . . . areconstrained to remain within this boundary region. Hence, unlike priorart techniques that required advance planning, a safe route for medicaldevice 100 into and out of a patient is generated based on waypoint data231 recorded as steerable endoscope 100 moves into the patient.

When segment 101-1 is considered a trailing segment, as just described,segment 101-1 is controlled in the same way as the other trailingarticulatable segments. However, in another insertion mode, segment101-1 remains directly controlled by the operator and does not changeshape with insertion. In this insertion mode, segment 101-1 would not beconsidered a trailing segment.

FIGS. 3A to 3C are illustrations of boundary regions 310A to 310C, withdifferent cross-sectional shapes, for safe path 150 defined by orderedsequence of locations {P_(k), P_(k+1), P_(k+2), P_(k+3), P_(k+4)}. InFIG. 3A, boundary region 310A has a circular cross-section. In FIG. 3B,boundary region 310B has an oblate cross-section. In FIG. 3C, boundaryregion 310C has a rectangular cross-section, and in particular, aspecific instance of a rectangular cross-section, a squarecross-section.

In one aspect, each location P_(k) is a point in space (x_(k), y_(k),z_(k)) relative to a fixed reference frame. Thus, each of boundaryregions 310A, 310B, 310C defines a three-dimensional volume enclosingsafe path 150. This volume is referred to as a tube having a crosssection to convey the three-dimensional characteristics of the volume.Tube, as used here, is not a physical tube inserted in the patient todefine the volume.

The particular cross-sectional shapes of the boundary regionsillustrated in FIGS. 3A to 3C are illustrative only and are not intendedto be limiting. In view of this disclosure, for a particular medicalprocedure and steerable medical device, an appropriately shaped boundaryregion or regions can be selected.

It is not necessary that the boundary region have the samecross-sectional shape over the entire extent of the safe path. Forexample, a first portion of a boundary region could have a firstcross-sectional shape, and a second portion of the boundary region couldhave a second cross-sectional shape that is different from the firstcross-sectional shape.

FIG. 4 is a process flow diagram for one embodiment of a method 400 usedwith a steerable medical device such as steerable endoscope 100. In oneaspect, instructions in a METHOD 400 module 232 (FIG. 2) in memory 230are executed on a processor in processor module 250 to perform at leastsome of the operations described more completely below.

In method 400, STORE WAYPOINTS operation 420, as described morecompletely below, saves waypoints of the tip of steerable endoscope 100as an ordered sequence of locations. The ordered sequence of locationsrepresents the trajectory of the tip as steerable endoscope 100 isinserted into the patient. As described above, the ordered sequence oflocations defines a safe path 150 that has been selected by the operatorof steerable endoscope 100.

The stored ordered sequence of locations is retrieved and analyzed inFOLLOW SAFE PATH process 430. FOLLOW SAFE PATH process 430 configuresthe articulatable portion of endoscope 100 so that the articulatableportion of endoscope 100 is constrained to follow safe path 150 as thearticulatable portion moves within the patient. Herein, following thesafe path does not mean that the safe path is followed exactly, butrather that the articulatable portion steerable endoscope 100 stays atleast within a safe region, sometimes called a boundary region, aboutsafe path 150.

In FIG. 4, one embodiment of STORE WAYPOINTS operation 420 and FOLLOWSAFE PATH process 430 are illustrated and described more completelybelow. This embodiment is illustrative only and is not intended to belimiting to the specific operations and processes described. In view ofthis disclosure, one knowledgeable in the field can utilize othertechniques to move the articulatable portion of a steerable medical intoand out of a patient while following the safe path described herein.

In FIG. 4, upon initiation of method 400, an INITIALIZE operation 401 isperformed. INITIALIZE operation 401 initializes any variables, memorystructures etc that are need for subsequent operations in method 400. Inone aspect, INITIALIZE operation 401 uses display controller 235 (FIG.2) to generate a display on display device 210 that permits the operatorof steerable endoscope 100 to select parameters that define the extentof the boundary region, for example. Upon completion INITIALIZEoperation 401 (FIG. 4) transfers processing to ESTABLISH WAYPOINToperation 402 in STORE WAYPOINTS operation 420.

In ESTABLISH WAYPOINT operation 402, a waypoint on the safe path of theendoscope is established. This can be done in a variety of ways.Accordingly, check operations 410 to 412, as discussed more completelybelow, are illustrative only and are not intended to be limiting to thisparticular implementation.

In one aspect, as the operator inserts steerable endoscope 100 into abody cavity (for instance, through an incision in the stomach into theabdominal cavity) insertion is paused periodically. When motion ofendoscope 100 is paused, DEVICE MOTION PAUSED check operation 410transfers processing to DEVICE MOTION RESUMED check operation 411.

If steerable endoscope 100 is paused to determine a safe trajectory forthe tip, the operator uses the camera and illumination at the tip ofsteerable endoscope 100 to determine a safe trajectory inside the bodycavity. When viewing the interior of the body cavity and determining asafe direction for farther insertion, the endoscope tip may be orientedin any direction to provide views of the body cavity.

Once a safe trajectory is determined, the tip is oriented in thedirection that the operator intends steerable endoscope 100 to travelupon farther insertion. The operator then inserts endoscope 100 fartherinto the patient. However, the operator could also retract endoscope 100after the pause. Thus, upon resumption of motion of endoscope 100,DEVICE MOTION RESUMED check operation 411 transfers processing toINSERTION check operation 412.

INSERTION check operation 412 determines whether after the pause, theoperation is continuing to insert endoscope 100 or is retractingendoscope 100. If the operator is continuing to insert endoscope 100,check operation 412 transfers processing to SAVE WAYPOINT operation 403.Conversely, if the operator is retracting endoscope 100, check operation412 transfers to DEVICE MOTION PAUSED check operation 410 and toMAINTAIN SEGMENTS IN BOUNDARY REGION operation 405.

Again, the combination of operations 410 to 412 is one way to allow anoperator to establish a waypoint. Alternatively, the operator could, forexample, push a button when a safe trajectory has been identified andthe operator is about to move the endoscope tip on that trajectory.

SAVE WAYPOINT operation 403 records the previous location of the tip asa waypoint in WAYPOINT DATA 403A, which in FIG. 2 is shown as waypointdata 231. SAVE WAYPOINT operation 403, upon completion, transfersprocessing to NEW LINK INSERTED check operation 404. SAVE WAYPONToperation 403 also transfers back to the start of ESTABLISH WAYPOINToperation 402 in case the operator decides to change the direction ofthe safe trajectory.

In this example, insertion of a link is used as a trigger to recordanother waypoint for the tip. However, other criteria can be used solong as locations of the tip are saved with sufficient resolution topermit determining a safe path. As steerable endoscope 100 is movedfurther into the patient along the safe trajectory, as each new link isinserted in the patient, the location of the tip is saved as anotherwaypoint. In this example, when a new link is inserted, NEW LINKINSERTED check operation 404 transfers processing to SAVE WAYPOINToperation 403, which was described above, and to UPDATE check operation409.

UPDATE check operation 409 is shown with a dotted line in FIG. 4 becausecheck operation 409 is optional. In one aspect, the configuration of thetrailing segments of endoscope 100 is updated only after a predefinednumber of new waypoints have been saved. In this aspect, UPDATE checkoperation 409 does not transfer processing to process 405 until thepredefined number of new waypoints is available in WAYPOINT DATA 403A.Also, UPDATE check operation 409 checks the states of the articulatablesegments and if none of the articulatable segments have statearticulating, UPDATE check operation 409 does not transfer processing toprocess 405. Alternatively, the configuration of the trailing segmentsof endoscope 100 is updated for each new waypoint and so UPDATE checkoperation 409 is not needed.

In this embodiment, FOLLOW SAFE PATH process 430 includes MAINTAINSEGMENTS IN BOUNDARY REGION process 405 and SEND COMMAND process 406.MAINTAIN SEGMENTS IN BOUNDARY REGION process 405 uses the savedwaypoints to generate a configuration for each of the inserted links sothat trailing segments 101-1 to 101-3 follow safe path 150 of the tip asdefined by the waypoints. As noted above, for some steerable medicaldevices, it may not be possible to configure the trailing segments tofollow exactly safe path 150.

Thus, in one aspect, a boundary region about the ordered sequence oflocations {P_(k)}_(k=1) ^(N) is generated. Here, P_(k) denotes theCartesian coordinates of the endoscope tip when the number of theinserted links is k. After the endoscope has been inserted for N links,the path trajectory of the endoscope tip is recorded as ordered sequenceof locations {P_(k)}_(k=1) ^(N) in memory 230 (FIG. 2).

As described above, the boundary region defines a volume around safepath 150, i.e., a volume that encloses safe path 150. The trailingsegments can safely pass through any part of the boundary region as thetrailing segments move towards the surgical site, or move away from thesurgical site.

In one aspect, a kinematic model of steerable endoscope 100, such asmodel 500 in FIG. 5, is used in MAINTAIN SEGMENTS IN BOUNDARY REGIONprocess 405. In kinematic model 500, (FIG. 5), a first level 501 ofmodel 500 defines the number of articulatable segments in a plurality ofarticulatable segments of the steerable endoscope. In this example, thesteerable endoscope has four articulatable segments Seg 1, Seg 2, Seg 3,and Seg 4.

A second level 502 of model 500 is a representation of links and jointsin each of four articulatable segments Seg 1, Seg 2, Seg 3, and Seg 4.In this example, each segment includes eight links, where adjacent linksare separated by a joint. The joints are numbered sequentially from thedistal end to the proximal end of the endoscope, starting with a valueone as shown in a third level 503 of model 500. (This numbering sequenceis for convenience only. In other aspects, the numbering may increase ingoing from a proximal location towards a distal location.) Each link hasa fixed length and the associated joint can rotate in a single plane,either the x-plane or the y-plane. The joints alternate so adjacentlinks rotate in different planes.

In model 500, each of four articulatable segments Seg 1, Seg 2, Seg 3,and Seg 4 has an angle of rotation about the x-axis and an angle ofrotation about the y-axis. For articulatable segment Seg 1, the angle ofrotation about the x-axis is θ_(y) ¹, (sometimes referred to as pitch)and the angle of rotation about the y-axis is θ_(x) ¹ (sometimesreferred to as yaw). For articulatable segment Seg 2, the angle ofrotation about the x-axis is θ_(y) ², and the angle of rotation aboutthe y-axis is θ_(x) ². For articulatable segment Seg 3, the angle ofrotation about the x-axis is θ_(y) ³, and the angle of rotation aboutthe y-axis is θ_(x) ³. For articulatable segment Seg 4, the angle ofrotation about the x-axis is θ_(y) ⁴, and the angle of rotation aboutthe y-axis is θ_(x) ⁴.

Row 505 in model 500 gives the initial constraint on the joint angles.In this example, the joint angles for a segment are assumed to be equal.Thus, each joint angle is one-fourth of the corresponding segment angle.Row 506 in model 500 gives the roll matrix for each joint.

In this model, y-links are links that cause motion in the y-directionrather than links that rotate about the y-direction. This definitionresults in R_(x)(θ_(y)). Similarly, in this model, x-links are linksthat cause motion in the x-direction rather than links that rotate aboutthe x-direction. This definition results in R_(y)(θ_(x)) Thoseknowledgeable in the field understand that alternative definitions canbe used in the kinematic model, where x-links are links that rotateabout the x-direction and y-links are links that rotate about they-direction. Irrespective of the kinematic model definitions, theresults are equivalent.

Thus, model 500 is illustrative only and is not intended to be limiting.Model 500 is used in one example that is developed more completelybelow.

Using stored ordered sequence of locations {P_(k)}_(k=1) ^(N) andkinematic model 500, a cost function is minimized to generate positionand orientation data of the endoscope segments in MAINTAIN SEGMENTS INBOUNDARY REGION process 405. Specifically, in one aspect, positions andorientations are generated for each of the links in the articulatableportion of endoscope 100. The positions and orientations are constrainedwithin the boundary region.

The cost function allows the position and orientation to be optimizedfor a variety of criteria, for example, but not limited to: 1) maximumtip controllability; 2) maximum distance of the segments frominverse-kinematic singularities; 3) maximum distance of the segmentsfrom articulation limits; 4) maximum distance from user-definedbody-cavity boundaries (organs, adhesions, etc.); 5) minimum distancefrom the defined path.

In process 405, the cost function may be a dynamically changing functionof any number of criteria. However, the number of criteria is selectedso the cost function can be minimized and the segments positioned toachieve the constrained movement within an endoscope movement timeacceptable to the operator. Conventional techniques are used by aprocessor to minimize the cost function selected subject to the positionconstraints imposed.

In an additional aspect, an embodiment of process 405 determines theoptimal configuration of the segments (relative segment angles) tosatisfy the constraint that the segment links stay “near to” the pathdefined by the tip forward motion and any additional constraints on thelink (or segment) positions.

For example, in process 405, the segments may be allowed to assumepositions within a tubular bounding region 310A (FIG. 3A) around the tippath while encouraging tip manipulability. One way to encourage tipmanipulability in process 405 is to minimize the sum of the absolutevalues of the relative joint angles, with the additional constraint thatthe link positions not deviate by more than a distance Δ at each of thewaypoints in ordered sequence of locations {P_(k)}_(k=1) ^(N). In oneaspect, distance Δ is specified by the operator.

Upon determining the configuration for each of the articulatablesegments, MAINTAIN SEGMENTS IN BOUNDARY REGION process 405 transfersprocessing to SEND COMMAND process 406 (FIG. 4). In SEND COMMAND process406, the processor in processor module 250 (FIG. 2) sends at least onecommand to the motors in endoscope controller 240 to configure thearticulatable segments based on the locations and orientations generatedin process 405, i.e., based on the configuration generated in process405. This constrains the articulatable segments within the boundaryregion as endoscope 100 moves further into the patient.

SEND COMMAND process 406 transfers to DEVICE MOTION PAUSED checkoperation 410 and to RETRACTION AND LINK RETRACTED check operation 407.RETRACTION AND LINK RETRACTED check operation 407 determines whetherendoscope 100 is being retracted and whether a link has been retracted.If both of these conditions are true, check operation 407 transfers toDELETE WAYPOINT operation 408.

DELETE WAYPOINT operation 408 deletes the stored waypoint for thewithdrawn link and transfers to operation 405. Hence, operations 405 to408 cause endoscope 100 to follow safe path 150 as endoscope 100 isretracted from the patient.

In the example of FIG. 2, in response to the command, endoscopecontroller 240 configures the segments so that as the segments moveforward, the segments are constrained to stay within the boundaryregion. Thus, the segments may not follow the trajectory of the tipexactly, but the segments follow a path within the boundary region thatis safe.

When the operator starts to withdraw the endoscope from the patient, thewaypoints in the stored ordered sequence of locations {P_(k)}_(k=1) ^(N)decrease by one as each link is withdrawn. Processes 405 and 406 areused as steerable endoscope is withdrawn to maintain endoscope 100 withthe boundary region.

As a further example of process 405, the control of the joint angles atconstant endoscopic length increments is considered such that theendoscope configuration is kept within a safety area, the boundaryregion described above, during the process of insertion and withdrawal.In this example, a configuration of the trailing links that is closest,as measured by Euclidean norm, to the tip trajectory is generated inprocess 405, since the tip trajectory represents a safe route selectedby the operator.

As described above P_(k) denotes the Cartesian coordinate of theendoscope tip when the number of the inserted links is k. After theendoscope has been inserted for N links, the path trajectory of theendoscope tip is recorded in a series {P_(k)}_(k=1) ^(N). Process 405controls the joint angles to achieve an endoscope link configurationclose to the waypoints in recorded series {P_(k)}_(k=1) ^(N). This isformulated as the following optimization, where J is the cost functiondiscussed above:

$\begin{matrix}{{{\min\limits_{\theta}J} = {\frac{1}{2}{\sum\limits_{k = 1}^{N}{{p_{k} - P_{k}}}^{2}}}}{{subject}\mspace{14mu} {to}}} & (1) \\{{\theta_{m\; i\; n} \leq \theta \leq \theta_{{ma}\; x}},} & (2)\end{matrix}$

where p_(k) is the coordinate of each link determined by the kinematicsmodel.

To apply an iterative procedure to solve this problem, assume that atthe n-th step, a solution is θ_(n) and the next increment Δθ_(n) is tobe determined. The new link coordinate is approximated by

p ^(n+1) ≈p ^(n)+∇_(θ) _(n) p·Δθ _(n).   (3)

Substituting expression (3) into the cost function gives:

J ^(n+1)=1/2 ∥p ^(n+1) −P∥ ²≈1/2∥∇_(θ) _(n) p·Δθ _(n) +p ^(n) −P∥ ².  (4)

This is indeed a quadratic programming problem:

$\begin{matrix}{{{\min\limits_{\Delta \; \theta}J} = {{\frac{1}{2}\Delta {\theta_{n}\left( {\nabla_{\theta_{n}}p} \right)}^{T}{\nabla_{\theta_{n}}p}\Delta \theta_{n}} + {\left( {p^{n} - P} \right)^{T}{\nabla_{\theta_{n}}p}\Delta \theta_{n}}}},} & (5)\end{matrix}$

subject to

θ_(min)−θ_(n)≤Δθ_(n)≤θ_(max)−θ_(n).   (6)

Kinematics Model

With respect to FIG. 5, let the first input parameter be defined as:

$\begin{matrix}{q = {\begin{bmatrix}\theta_{x}^{1} & \theta_{y}^{1} \\\theta_{x}^{2} & \theta_{y}^{2} \\\theta_{x}^{3} & \theta_{y}^{3} \\\theta_{x}^{4} & \theta_{y}^{4}\end{bmatrix}.}} & (7)\end{matrix}$

The vector of joint angles is defined as:

$\begin{matrix}{{q_{jw} = \left\lbrack {\frac{\theta_{x}^{1}}{4},\frac{\theta_{y}^{1}}{4},\frac{\theta_{x}^{1}}{4},\frac{\theta_{y}^{1}}{4},\frac{\theta_{x}^{1}}{4},\frac{\theta_{y}^{1}}{4},\frac{\theta_{x}^{1}}{4},\frac{\theta_{y}^{1}}{4},\frac{\theta_{x}^{2}}{4},\frac{\theta_{y}^{2}}{4},\frac{\theta_{x}^{2}}{4},\frac{\theta_{y}^{2}}{4},\frac{\theta_{x}^{2}}{4},\frac{\theta_{y}^{2}}{4},\frac{\theta_{x}^{2}}{4},\frac{\theta_{y}^{2}}{4},\frac{\theta_{x}^{3}}{4},\frac{\theta_{y}^{3}}{4},\frac{\theta_{x}^{3}}{4},\frac{\theta_{y}^{3}}{4},\frac{\theta_{x}^{3}}{4},\frac{\theta_{y}^{3}}{4},\frac{\theta_{x}^{3}}{4},\frac{\theta_{y}^{3}}{4},\frac{\theta_{x}^{4}}{4},\frac{\theta_{y}^{4}}{4},\frac{\theta_{x}^{4}}{4},\frac{\theta_{y}^{4}}{4},\frac{\theta_{x}^{4}}{4},\frac{\theta_{y}^{4}}{4},\frac{\theta_{x}^{3}}{4},\frac{\theta_{y}^{4}}{4}} \right\rbrack},} & (8)\end{matrix}$

and the state of each link is defined as:

$\begin{matrix}{{{{T_{lw}(1)} = \begin{bmatrix}{R_{y}\left( {- \frac{\theta_{x}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(1)}}\end{pmatrix} \\0 & 1\end{bmatrix}},{{T_{lw}(3)} = \left\lbrack \begin{matrix}{R_{y}\left( {- \frac{\theta_{x}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(3)}}\end{pmatrix} \\0 & 1\end{matrix}\  \right\rbrack},{{T_{lw}(5)} = \begin{bmatrix}{R_{y}\left( {- \frac{\theta_{x}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(5)}}\end{pmatrix} \\0 & 1\end{bmatrix}},{{T_{lw}(7)} = \begin{bmatrix}{R_{y}\left( {- \frac{\theta_{x}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(7)}}\end{pmatrix} \\0 & 1\end{bmatrix}},{{T_{lw}(2)} = \begin{bmatrix}{R_{x}\left( {- \frac{\theta_{y}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(2)}}\end{pmatrix} \\0 & 1\end{bmatrix}},{{T_{lw}(4)} = \left\lbrack \begin{matrix}{R_{x}\left( {- \frac{\theta_{y}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(4)}}\end{pmatrix} \\0 & 1\end{matrix}\  \right\rbrack},{{T_{lw}(6)} = \left\lbrack \begin{matrix}{R_{x}\left( {- \frac{\theta_{y}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(6)}}\end{pmatrix} \\0 & 1\end{matrix}\  \right\rbrack},{{T_{lw}(8)} = \left\lbrack \begin{matrix}{R_{x}\left( {- \frac{\theta_{y}^{1}}{4}} \right)} & \begin{pmatrix}0 \\0 \\{- {a(8)}}\end{pmatrix} \\0 & 1\end{matrix}\  \right\rbrack},{where}}{{R_{x}(\theta)} = {\begin{bmatrix}1 & 0 & 0 \\0 & {\cos (\theta)} & {- {\sin (\theta)}} \\0 & {\sin (\theta)} & {\cos (\theta)}\end{bmatrix}\mspace{14mu} {and}}}{{R_{y}\left( {- \theta} \right)} = \begin{bmatrix}{\cos (\theta)} & 0 & {- {\sin (\theta)}} \\0 & 1 & 0 \\{\sin (\theta)} & 0 & {\cos (\theta)}\end{bmatrix}}} & (9)\end{matrix}$

The rest of the T_(lw)'s can be obtained in a similar fashion. Inparticular,

$\begin{matrix}{{T_{lw}\left( {33} \right)} = {\left\lbrack \begin{matrix}I & \begin{pmatrix}0 \\0 \\{- {a(33)}}\end{pmatrix} \\0 & 1\end{matrix}\  \right\rbrack.}} & (10)\end{matrix}$

Notice that all these T_(lw)'s are in the Special Euclidean Lie groupSE(4).

The cumulative transform to the base from the distal end of link k canbe derived as

$\begin{matrix}{{T_{cl}(k)} = {{\prod\limits_{j = 1}^{k}{T_{lw}(j)}} = {{T_{lw}(1)} \times {T_{lw}(2)} \times \ldots \times {{T_{lw}(k)}.}}}} & (11)\end{matrix}$

In this section, gradient ∇_(θ)l_(k) is derived, where l is the positionvector for link k. To this end, define the basis for the skew-symmetricmatrix so(3) as follows:

$\begin{matrix}{{\sigma_{x} = \begin{bmatrix}0 & 0 & 0 \\0 & 0 & {- 1} \\0 & 1 & 0\end{bmatrix}},{\sigma_{y} = \begin{bmatrix}0 & 0 & 1 \\0 & 0 & 0 \\{- 1} & 0 & 0\end{bmatrix}},{\sigma_{z} = {\begin{bmatrix}0 & {- 1} & 0 \\1 & 0 & 0 \\0 & 0 & 0\end{bmatrix}.}}} & (12)\end{matrix}$

The rotation matrices can then be described as

R _(x)(θ)=exp (σ_(x)θ), R _(y)(θ)=exp (σ_(y)θ), R _(z)(θ)=exp (σ_(z)θ)  (13)

Suppose that R is a rotation matrix

$\begin{matrix}{R = {\begin{bmatrix}r_{11} & r_{12} & r_{13} \\r_{21} & r_{22} & r_{23} \\r_{31} & r_{32} & r_{33}\end{bmatrix}.}} & (14)\end{matrix}$

Since RR^(T)=I, an important property for R can be derived:

Rσ _(x) R ^(T) =r ₁₁σ_(x) +r ₂₁σ_(y) +r ₃₁σ_(z), (15)

R ^(T)σ_(x) R=r ₁₁σ_(x) +r ₁₂σ_(y) +r ₁₃σ_(z), (16)

Rσ _(y) R ^(T) =r ₁₂σ_(x) +r ₂₂σ_(y) +r ₃₂σ_(z), (17)

R ^(T) σ _(y) R=r ₂₁σ_(x) +r ₂₂σ_(y) +r ₂₃σ_(z), (18)

Now, the gradient dT_(cl)(k)/dθ is derived. Let

$\begin{matrix}{{T_{lw}(k)} = {{\begin{bmatrix}R_{k} & a_{k} \\0 & 1\end{bmatrix}\mspace{14mu} {and}\mspace{14mu} {T_{cl}(k)}} = {\begin{bmatrix}S_{k} & l_{k} \\0 & 1\end{bmatrix}.}}} & (19)\end{matrix}$

It is easy to derive that

S_(k)=R₁R₂ . . . R_(k),   (20)

l _(k) =R ₁ R ₂ . . . R _(k−1) a _(k) +R ₁ R ₂ . . . R _(k−2) a _(k−1) +. . . +R ₁ a ₂ +a ₁ =S _(k−1) a _(k) +S _(k−2) a _(k−1) + . . . +S ₁ a ₂+a ₁,   (21)

and l₁=a₁. We therefore have

$\begin{matrix}{{\frac{dS_{k}}{d\theta} = {\frac{d}{d\theta}\left( {R_{1}R_{2}\mspace{14mu} \ldots \mspace{14mu} R_{k}} \right)}},} & (22) \\{{\frac{{dl}_{k}}{d\theta} = {{\frac{dS_{k - 1}}{d\theta}a_{k}} + {\frac{dS_{k - 2}}{d\theta}a_{k - 1}} + \ldots + {\frac{dS_{1}}{d\theta}a_{2}}}},{\left( {k \geq 2} \right).}} & (23)\end{matrix}$

When θ=θ_(x) ¹, for k≥7, we have

$\begin{matrix}{{\frac{dS_{k}}{d\theta_{x}^{1}}S_{k}^{T}} = {\frac{d}{d\theta_{x}^{1}}\left( {R_{1}R_{2}\mspace{14mu} \ldots \mspace{14mu} R_{k}} \right)S_{k}^{T}}} & {(24)} \\{= {{\frac{dR_{1}}{d\theta_{x}^{1}}\ \left( {R_{2}\mspace{14mu} \ldots \mspace{14mu} R_{k}} \right)S_{k}^{T}} + {R_{1}R_{2}\frac{dR_{3}}{d\theta_{x}^{1}}\left( {R_{4}\mspace{14mu} \ldots \mspace{14mu} R_{k}} \right)S_{k}^{T}} +}} & \\{{{R_{1}R_{2}R_{3}R_{4}\frac{dR_{5}}{d\theta_{x}^{1}}\ \left( {R_{6}\mspace{14mu} \ldots \mspace{14mu} R_{k}} \right)S_{k}^{T}}\  +}} & \\{{R_{1}R_{2}R_{3}R_{4}R_{5}R_{6}\frac{dR_{7}}{d\theta_{x}^{1}}\left( {R_{8}\mspace{14mu} \ldots \mspace{14mu} R_{k}} \right)S_{k}^{T}}} & \\{= {\left( {- \frac{\sigma_{y}}{4}} \right) + {R_{1}{R_{2}\left( {- \frac{\sigma_{y}}{4}} \right)}\left( {R_{1}R_{2}} \right)^{T}} +}} & {(25)} \\{{{R_{1}R_{2}R_{3}{R_{4}\left( {- \frac{\sigma_{y}}{4}} \right)}\left( {R_{1}R_{2}R_{3}R_{4}} \right)^{T}} +}} & \\{{R_{1}R_{2}R_{3}R_{4}R_{5}{R_{6}\left( {- \frac{\sigma_{y}}{4}} \right)}\left( {R_{1}R_{2}R_{3}R_{4}R_{5}R_{6}} \right)^{T}}} & \\{{{= {{- \frac{\sigma_{y}}{4}} + {{S_{2}\left( {- \frac{\sigma_{y}}{4}} \right)}S_{2}^{T}} + {{S_{4}\left( {- \frac{\sigma_{y}}{4}} \right)}S_{4}^{T}} + {{S_{6}\left( {- \frac{\sigma_{y}}{4}} \right)}S_{6}^{T}}}},}\mspace{20mu}} & {(26)}\end{matrix}$

which in turn yields

$\begin{matrix}{\frac{dS_{k}}{d\theta_{x}^{1}} = {{- \frac{1}{4}}\left( {\sigma_{y} + {S_{2}\sigma_{y}S_{2}^{T}} + {S_{4}\sigma_{y}S_{4}^{T}} + {S_{6}\sigma_{y}S_{6}^{T}}} \right){S_{k}.}}} & (27)\end{matrix}$

For k=5 or 6, we obtain

$\begin{matrix}{{{{\frac{dS_{k}}{d\theta_{x}^{1}}S_{k}^{T}} = {{- \frac{\sigma_{y}}{4}} + {{S_{2}\left( {- \frac{\sigma_{y}}{4}} \right)}S_{2}^{T}} + {{S_{4}\left( {- \frac{\sigma_{y}}{4}} \right)}S_{4}^{T}}}},{thus}}{{\frac{dS_{k}}{d\theta_{x}^{1}} = {{- \frac{1}{4}}\left( {\sigma_{y} + {S_{2}\sigma_{y}S_{2}^{T}} + {S_{4}\sigma_{y}S_{4}^{T}}} \right)S_{k}}};}} & (28)\end{matrix}$

for k=3 or 4,

$\begin{matrix}{{\frac{dS_{k}}{d\theta_{x}^{1}} = {{- \frac{1}{4}}\left( {\sigma_{y} + {S_{2}\sigma_{y}S_{2}^{T}}} \right)S_{k}}};} & (29)\end{matrix}$

and for k=1 or 2,

$\begin{matrix}{{\frac{dS_{k}}{d\theta_{x}^{1}} = {{- \frac{1}{4}}\sigma_{y}S_{k}}};} & (30)\end{matrix}$

In summary,

$\begin{matrix}{\frac{dS_{k}}{d\theta_{x}^{1}} = \left\{ \begin{matrix}{{{- \frac{1}{4}}\sigma_{y}S_{k}},} & {{k = 1},{2;}} \\{{{- \frac{1}{4}}\left( {\sigma_{y} + {S_{2}\sigma_{y}S_{2}^{T}}} \right)S_{k}},} & {{k = 3},{4;}} \\{{{- \frac{1}{4}}\left( {\sigma_{y} + {S_{2}\sigma_{y}S_{2}^{T}} + {S_{4}\sigma_{y}S_{4}^{T}}} \right)S_{k}},} & {{k = 5},{6;}} \\{{{- \frac{1}{4}}\left( {\sigma_{y} + {S_{2}\sigma_{y}S_{2}^{T}} + {S_{4}\sigma_{y}S_{4}^{T}} + {S_{6}\sigma_{y}S_{6}^{T}}} \right)S_{k}},} & {k \geq 7.}\end{matrix} \right.} & (31) \\{\frac{dS_{k}}{d\theta_{x}^{2}} = \left\{ \begin{matrix}{0,} & {{k \leq 8};} \\{{{- \frac{1}{4}}\left( {S_{8}\sigma_{y}S_{8}^{T}} \right)S_{k}},} & {{k = 9},{10;}} \\{{{- \frac{1}{4}}\left( {{S_{8}\sigma_{y}S_{8}^{T}} + {S_{10}\sigma_{y}S_{10}^{T}}} \right)S_{k}},} & {{k = 11},{12;}} \\{{{- \frac{1}{4}}\left( {{S_{8}\sigma_{y}S_{8}^{T}} + {S_{10}\sigma_{y}S_{10}^{T}} + {S_{12}\sigma_{y}S_{12}^{T}}} \right)S_{k}},} & {{k = 13},{14;}} \\{{{- \frac{1}{4}}\left( {{S_{8}\sigma_{y}S_{8}^{T}} + {S_{10}\sigma_{y}S_{10}^{T}} + {S_{12}\sigma_{y}S_{12}^{T}} + {S_{14}\sigma_{y}S_{14}^{T}}} \right)S_{k}},} & {k \geq 15.}\end{matrix} \right.} & (32) \\{\frac{dS_{k}}{d\theta_{x}^{3}} = \left\{ \begin{matrix}{0,} & {{k \leq 16};} \\{{{- \frac{1}{4}}\left( {S_{16}\sigma_{y}S_{16}^{T}} \right)S_{k}},} & {{k = 17},{18;}} \\{{{- \frac{1}{4}}\left( {{S_{16}\sigma_{y}S_{16}^{T}} + {S_{18}\sigma_{y}S_{18}^{T}}} \right)S_{k}},} & {{k = 19},{20;}} \\{{{- \frac{1}{4}}\left( {{S_{16}\sigma_{y}S_{16}^{T}} + {S_{18}\sigma_{y}S_{18}^{T}} + {S_{20}\sigma_{y}S_{20}^{T}}} \right)S_{k}},} & {{k = 21},{22;}} \\{{{- \frac{1}{4}}\left( {{S_{16}\sigma_{y}S_{16}^{T}} + {S_{18}\sigma_{y}S_{18}^{T}} + {S_{20}\sigma_{y}S_{20}^{T}} + {S_{22}\sigma_{y}S_{22}^{T}}} \right)S_{k}},} & {k \geq 23.}\end{matrix} \right.} & (33)\end{matrix}$

Similarly,

$\begin{matrix}{\frac{dS_{k}}{d\theta_{y}^{1}} = \left\{ \begin{matrix}{0,} & {{k = 1};} \\{{\frac{1}{4}\left( {S_{1}\sigma_{x}S_{1}^{T}} \right)S_{k}},} & {{k = 2},{3;}} \\{{\frac{1}{4}\left( {{S_{1}\sigma_{x}S_{1}^{T}} + {S_{3}\sigma_{x}S_{3}^{T}}} \right)S_{k}},} & {{k = 4},{5;}} \\{{\frac{1}{4}\left( {{S_{1}\sigma_{x}S_{1}^{T}} + {S_{3}\sigma_{x}S_{3}^{T}} + {S_{5}\sigma_{x}S_{5}^{T}}} \right)S_{k}},} & {{k = 6},{7;}} \\{{\frac{1}{4}\left( {{S_{1}\sigma_{x}S_{1}^{T}} + {S_{3}\sigma_{x}S_{3}^{T}} + {S_{5}\sigma_{x}S_{5}^{T}} + {S_{7}\sigma_{x}S_{7}^{T}}} \right)S_{k}},} & {k \geq 8.}\end{matrix} \right.} & (34) \\{\frac{dS_{k}}{d\theta_{y}^{2}} = \left\{ \begin{matrix}{0,} & {{k = 9};} \\{{\frac{1}{4}\left( {S_{9}\sigma_{x}S_{9}^{T}} \right)S_{k}},} & {{k = 10},{11;}} \\{{\frac{1}{4}\left( {{S_{9}\sigma_{x}S_{9}^{T}} + {S_{11}\sigma_{x}S_{11}^{T}}} \right)S_{k}},} & {{k = 12},{13;}} \\{{\frac{1}{4}\left( {{S_{9}\sigma_{x}S_{9}^{T}} + {S_{11}\sigma_{x}S_{11}^{T}} + {S_{13}\sigma_{x}S_{13}^{T}}} \right)S_{k}},} & {{k = 14},{15;}} \\{{\frac{1}{4}\left( {{S_{9}\sigma_{x}S_{9}^{T}} + {S_{11}\sigma_{x}S_{11}^{T}} + {S_{13}\sigma_{x}S_{13}^{T}} + {S_{15}\sigma_{x}S_{15}^{T}}} \right)S_{k}},} & {k \geq 16.}\end{matrix} \right.} & (35) \\{\frac{dS_{k}}{d\theta_{y}^{3}} = \left\{ \begin{matrix}{0,} & {{k = 17};} \\{{\frac{1}{4}\left( {S_{17}\sigma_{x}S_{17}^{T}} \right)S_{k}},} & {{k = 18},{19;}} \\{{\frac{1}{4}\left( {{S_{17}\sigma_{x}S_{17}^{T}} + {S_{19}\sigma_{x}S_{19}^{T}}} \right)S_{k}},} & {{k = 20},{21;}} \\{{\frac{1}{4}\left( {{S_{17}\sigma_{x}S_{17}^{T}} + {S_{19}\sigma_{x}S_{19}^{T}} + {S_{21}\sigma_{x}S_{21}^{T}}} \right)S_{k}},} & {{k = 22},{23;}} \\{{\frac{1}{4}\left( {{S_{17}\sigma_{x}S_{17}^{T}} + {S_{19}\sigma_{x}S_{19}^{T}} + {S_{21}\sigma_{x}S_{21}^{T}} + {S_{23}\sigma_{x}S_{23}^{T}}} \right)S_{k}},} & {k \geq 24.}\end{matrix} \right.} & (36)\end{matrix}$

In this subsection, the Jacobian is derived. Let

$\begin{matrix}{{T_{J}(k)} = {{\prod\limits_{j = {k + 1}}^{N}{T_{lw}(j)}} = {{T_{lw}\left( {k + 1} \right)} \times \ldots \times {{T_{lw}(N)}.}}}} & (37)\end{matrix}$

and denote its blocks as

$\begin{matrix}{{T_{J}(k)} = {\begin{bmatrix}R_{k}^{J} & l_{k}^{J} \\0 & 1\end{bmatrix}.}} & (38)\end{matrix}$

Recalling Eq.(19), we have

$\begin{matrix}\begin{matrix}{\frac{d{T_{cl}(N)}}{d\theta_{x}^{1}} = \begin{bmatrix}\frac{{dS}_{N}}{d\; \theta_{x}^{1}} & \frac{{dl}_{N}}{d\; \theta_{x}^{1}} \\0 & 0\end{bmatrix}} \\{= {{\frac{d{T_{lw}(1)}}{d\theta_{x}^{1}}{T_{lw}(2)}\mspace{14mu} \ldots \mspace{14mu} {T_{lw}(N)}} +}} \\{{{{T_{lw}(1)}{T_{lw}(2)}\frac{d{T_{lw}(3)}}{d\theta_{x}^{1}}{T_{lw}(4)}\mspace{14mu} \ldots \mspace{14mu} {T_{lw}(N)}} +}} \\{{{{T_{lw}(1)}{T_{lw}(2)}{T_{lw}(3)}{T_{lw}(4)}\frac{d{T_{lw}(5)}}{d\theta_{x}^{1}}{T_{lw}(6)}\mspace{14mu} \ldots \mspace{14mu} {T_{lw}(N)}} +}} \\{{{T_{lw}(1)}{T_{lw}(2)}{T_{lw}(3)}{T_{lw}(4)}{T_{lw}(5)}{T_{lw}(6)}\frac{d{T_{lw}(7)}}{d\theta_{x}^{1}}{T_{lw}(8)}\mspace{14mu} \ldots}\mspace{14mu}} \\{{T_{lw}(N)}} \\{= {{\begin{bmatrix}{{- R_{1}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}{T_{J}(1)}} + {{{T_{cl}(2)}\begin{bmatrix}{{- R_{3}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}}{T_{J}(3)}} +}} \\{{{{{T_{cl}(4)}\begin{bmatrix}{{- R_{5}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}}{T_{J}(5)}} + {{{T_{cl}(6)}\begin{bmatrix}{{- R_{7}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}}{{T_{J}(7)}.}}}}\end{matrix} & (39)\end{matrix}$

The last equality is obtained by the definition of T_(cl) and T_(J).Proceeding further, we have

$\begin{matrix}{\frac{d{T_{cl}(N)}}{d\theta_{x}^{1}} = {{\begin{bmatrix}{{- R_{1}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}\begin{bmatrix}R_{1}^{J} & l_{1}^{J} \\0 & 1\end{bmatrix}} + {{\begin{bmatrix}S_{2} & l_{2} \\0 & 1\end{bmatrix}\begin{bmatrix}{{- R_{3}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}}\begin{bmatrix}R_{3}^{J} & l_{3}^{J} \\0 & 1\end{bmatrix}} +}} \\{{{{\begin{bmatrix}S_{4} & l_{4} \\0 & 1\end{bmatrix}\begin{bmatrix}{{- R_{5}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}}\begin{bmatrix}R_{5}^{J} & l_{5}^{J} \\0 & 1\end{bmatrix}} + {{\begin{bmatrix}S_{6} & l_{6} \\0 & 1\end{bmatrix}\begin{bmatrix}{{- R_{7}}\frac{\sigma_{y}}{4}} & 0 \\0 & 0\end{bmatrix}}\begin{bmatrix}R_{7}^{J} & l_{7}^{J} \\0 & 1\end{bmatrix}}}} \\{= \left\lbrack \begin{matrix}{{{- S_{1}}\frac{\sigma_{y}}{4}R_{1}^{J}} - {S_{3}\frac{\sigma_{y}}{4}R_{3}^{J}} - {S_{5}\frac{\sigma_{y}}{4}R_{5}^{J}} - {S_{7}\frac{\sigma_{y}}{4}R_{7}^{J}}} \\0\end{matrix} \right.} \\{\left. \begin{matrix}{{{- S_{1}}\frac{\sigma_{y}}{4}l_{1}^{J}} - {S_{3}\frac{\sigma_{y}}{4}l_{3}^{J}} - {S_{5}\frac{\sigma_{y}}{4}l_{5}^{J}} - {S_{7}\frac{\sigma_{y}}{4}l_{7}^{J}}} \\0\end{matrix} \right\rbrack.}\end{matrix}$

Therefore, the derivative of the position vector l_(N) with respect tothe joint angle θ_(x) ¹ is

$\begin{matrix}\begin{matrix}{\frac{{dl}_{N}}{d\theta_{x}^{1}} = {{{- S_{1}}\frac{\sigma_{y}}{4}l_{1}^{J}} - {S_{3}\frac{\sigma_{y}}{4}l_{3}^{J}} - {S_{5}\frac{\sigma_{y}}{4}l_{5}^{J}} - {S_{7}\frac{\sigma_{y}}{4}l_{7}^{J}}}} \\{= {{\frac{S_{1}}{4}\begin{bmatrix}{- l_{1,3}^{J}} \\0 \\l_{1,1}^{J}\end{bmatrix}} + {\frac{S_{3}}{4}\begin{bmatrix}{- l_{3,3}^{J}} \\0 \\l_{3,1}^{J}\end{bmatrix}} + {\frac{S_{5}}{4}\begin{bmatrix}{- l_{5,3}^{J}} \\0 \\l_{5,1}^{J}\end{bmatrix}} + {{\frac{S_{7}}{4}\begin{bmatrix}{- l_{7,3}^{J}} \\0 \\l_{7,1}^{J}\end{bmatrix}}.}}}\end{matrix} & (40)\end{matrix}$

In the above examples, the sequence of ordered locations and six-degreesof freedom were considered in configuring articulatable segments toremain within a boundary region, sometimes called a safe region.However, in some applications, consideration of only two-degrees offreedom may be sufficient. The x-y position could be controlled, or thepitch and the yaw could be controlled. In these applications, eachwaypoint only includes two degrees of freedom corresponding to aninsertion depth and the above processes become less computationallyintensive while the safe path is followed.

System controller 220 (FIG. 2) is illustrated as unified structures forease of illustration and understanding. This is illustrative only and isnot intended to be limiting. The various component of system controller220 can be located apart and still perform the functions described.

The above description and the accompanying drawings that illustrateaspects and embodiments of the present inventions should not be taken aslimiting—the claims define the protected inventions. Various mechanical,compositional, structural, electrical, and operational changes may bemade without departing from the spirit and scope of this description andthe claims. In some instances, well-known circuits, structures, andtechniques have not been shown or described in detail to avoid obscuringthe invention.

While the memory in FIG. 2 is illustrated as a unified structure, thisshould not be interpreted as requiring that all memory is at the samephysical location. All or part of the memory can be in a differentphysical location than a processor. Memory refers to a volatile memory,a non-volatile memory, or any combination of the two.

A processor is coupled to a memory containing instructions executed bythe processor. This could be accomplished within a computer system, oralternatively via a connection to another computer via modems and analoglines, or digital interfaces and a digital carrier line.

All examples and illustrative references are non-limiting and should notbe used to limit the claims to specific implementations and embodimentsdescribed herein and their equivalents. The headings are solely forformatting and should not be used to limit the subject matter in anyway, because text under one heading may cross reference or apply to textunder one or more headings. Finally, in view of this disclosure,particular features described in relation to one aspect or embodimentmay be applied to other disclosed aspects or embodiments of theinvention, even though not specifically shown in the drawings ordescribed in the text.

1-9. (canceled)
 10. A method comprising: storing, by a controller, afirst waypoint corresponding to a first position of a tip of a steerablemedical device, the steerable medical device including an articulatablesegment; performing a motion pause check operation, by a controller, todetermine that an insertion motion of the articulatable segment into apatient anatomy has been paused, wherein the tip of the steerablemedical device is at a second position when the insertion motion of thearticulatable segment is paused; determining, by the controller, thatthe articulatable segment has resumed the insertion motion into thepatient anatomy; after determining that the articulatable segment hasresumed the insertion motion, storing, by the controller, a secondwaypoint corresponding to the second position of the tip of thesteerable medical device; defining, by the controller, a boundaryregion, the boundary region forming a three-dimensional volume enclosingthe stored waypoints; and constraining, by the controller, thearticulatable segment to remain within the boundary region as thearticulatable segment is inserted in the patient anatomy.
 11. The methodof claim 10, wherein the first and second waypoints are disposed along afirst trajectory.
 12. The method of claim 10, further comprising: whilethe insertion motion of the articulatable segment is paused, receivingcontrol instructions, by the controller, to orient a tip of thesteerable medical device from a first trajectory toward a secondtrajectory.
 13. The method of claim 12, further comprising: while theinsertion motion of the articulatable segment is paused, receivingcontrol instructions, by the controller, to provide one or more cameraviews of the patient anatomy to determine the second trajectory.
 14. Themethod of claim 10, further comprising: performing an update checkoperation, by the controller, to determine that a predetermined numberof waypoints have been stored; and based on the determination that thepredetermined number of waypoint have been stored, initiating theconstraining of the articulatable segment.
 15. The method of claim 10,further comprising: determining, by the controller, a movement of thesteerable medical device in a retraction direction.
 16. The method ofclaim 10, further comprising: performing a second motion pause checkoperation, by a controller, to determine that the insertion motion ofthe articulatable segment into the patient anatomy has been paused,wherein the tip of a steerable medical device is at a third positionwhen the insertion motion of the articulatable segment is paused;determining, by the controller, that the articulatable segment hasresumed the insertion motion into the patient anatomy; and afterdetermining that the articulatable segment has resumed the insertionmotion, storing, by the controller, a third waypoint corresponding tothe third position of the tip of the steerable medical device, whereinthe three-dimensional volume encloses the stored waypoints, includingthe first, second and third waypoints.
 17. The method of claim 10,wherein the articulatable segment including a plurality of sequentiallyarranged sections.
 18. The method of claim 17, wherein a first sectionof the plurality of sequentially arranged sections is positioned withina patient anatomy when the first waypoint is stored.
 19. The method ofclaim 18, further comprising: determining, by the controller, aninsertion of a second section of the plurality of sequentially arrangedsections into the patient anatomy, wherein the second section isproximally adjacent to the first section in the plurality ofsequentially arranged sections; and based on the determined insertion ofthe second section, triggering, by the controller, storage of a thirdwaypoint corresponding to a third position of the tip of the steerablemedical device.
 20. A method comprising: storing, by a controller, afirst waypoint corresponding to a first three-dimensional position of atip of a steerable medical device in a fixed reference frame, thesteerable medical device including an articulatable segment, thearticulatable segment including a plurality of sequentially arrangedsections, wherein a first section of the plurality of sequentiallyarranged sections is positioned within a patient anatomy when the firstwaypoint is stored; determining, by the controller, an insertion of asecond section of the plurality of sequentially arranged sections into apatient anatomy, wherein the second section is proximally adjacent tothe first section in the plurality of sequentially arranged sections;based on the determined insertion of the second section, triggering, bythe controller, storage of a second waypoint corresponding to a secondthree-dimensional position of the tip of the steerable medical device inthe fixed reference frame; defining, by the controller, a boundaryregion, the boundary region forming a three-dimensional volume enclosingthe stored waypoints; and constraining, by the controller, thearticulatable segment to remain within the boundary region while one ormore of the plurality of sequentially arranged sections deviate from apath determined using the stored waypoints as the articulatable segmentis inserted in the patient anatomy.
 21. The method of claim 20, furthercomprising: determining, by the controller, an insertion of a thirdsection of the plurality of sequentially arranged sections into apatient anatomy, wherein the third section is proximally adjacent to thesecond section in the plurality of sequentially arranged sections; andbased on the determined insertion of the third section, triggering, bythe controller, storage of a third waypoint corresponding to a thirdthree-dimensional position of the tip of the steerable medical device inthe fixed reference frame, wherein the boundary region forms athree-dimensional volume enclosing the stored waypoints, including thethird waypoint.
 22. The method of claim 20, further comprising:performing a motion pause check operation, by the controller, todetermine that a motion of the steerable medical device has been paused.23. The method of claim 22, further comprising: while the steerablemedical device is paused, receive control instructions, by thecontroller, to provide one or more camera views of the patient anatomyto determine a safe trajectory.
 24. The method of claim 23, furthercomprising: while the steerable medical device is paused, receivecontrol instructions, by the controller, to orient the tip of thesteerable medical device toward the safe trajectory.
 25. The method ofclaim 22, further comprising: performing a motion resumed checkoperation, by the controller, to determine that a resumed motion of thesteerable medical device is in an insertion direction along anidentified trajectory; and based on the determination that the resumedmotion is in an insertion direction, initiate the storing of the firstwaypoint.
 26. The method of claim 25, wherein the first and secondwaypoints are disposed along the identified trajectory.
 27. The methodof claim 20, further comprising: performing an update check operation,by the controller, to determine that a predetermined number of waypointshave been stored; and based on the determination that the predeterminednumber of waypoint have been stored, initiate the constraining of thearticulatable segment.
 28. The method of claim 20, further comprising:determining, by the controller, a movement of the steerable medicaldevice in a retraction direction.
 29. The method of claim 28, furthercomprising: determining, by the controller, that at least one ofplurality of sequentially arranged sections has been withdrawn from thepatient anatomy.